#ifndef _YWEATHER_H
#define _YWEATHER_H

#include <libxml/SAX.h>
#include <stdbool.h>
#include "dwmstatus_types.h"

#define YWEATHER_CONDITION_ATTRIBUTE "text"
#define YWEATHER_TEMP_ATTRIBUTE "temp"
#define CURRENT_CONDITIONS_NODE "condition"

struct yweather {
  String condition;
  String temperature;
};

typedef struct yweather YWeather;
void set_yweather(char *);
void get_yweather(char*, size_t);
void yweather_start();
void yweather_format_weather(YWeather *);
void yweather_update_weather();
void *yweather_loop(void *ptr);
void yweather_sax_on_start(void *, const xmlChar *, const xmlChar *, const xmlChar *, const int, const xmlChar **, int, int, const xmlChar **);
void yweather_sax_on_end(void *, const xmlChar*, const xmlChar*, const xmlChar *);
void yweather_set_sax_handler(xmlSAXHandler *);


#endif
